<table>
    <thead>
        <tr>
            <th>Name</th>
            <th>Surname</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody jqxb-templatecontainer="customersListTemplate" jqxb-datasource="customersList">
        <tr jqxb-template="customersListTemplate" jqxb-templateitemidprfx="custlstprfx" style="display: none;">
            <td><span jqxb-itemdatamember="Name" jqxb-bindedattribute="text"></span> </td>
            <td><span jqxb-itemdatamember="Surname" jqxb-bindedattribute="text"></span> </td>
            <td><a href="#" class="selectCustEvt" >Select</a></span> </td>
        </tr>
    </tbody>
</table>
<script type="text/javascript">
  /*
    *   jQXB - Dynamic-Widget logic
    *
    */
    var CustomerList = {}
    // Load a Customer
    CustomerList.loadCustomerlist = function(){
        jQXB.getJSON(
                'getCustomerList.php',
                 null,
                function(data){
                    jQXB.setDataSource('customersList',data).doBind('customersList');
                });
    }

    // Event Handler 
    CustomerList.onItemDataBound = function (datasourceName, templateName, Occurency, dataItem, jQueryItemTemplate) {
        switch (templateName) {
            case 'customersListTemplate':
                var jQryAnchor = jQueryItemTemplate.find('.selectCustEvt');
				jQryAnchor.unbind();
                jQryAnchor.bind('click',function(){jQXBM.fireMessage(jQXBtopics.MSG_CUSTOMER_SELECTED,dataItem.id)});
                break;            
        }
    }

    jQuery(document).ready(function () {
        jQXB.addOnTemplateItemBoundhnd(CustomerList.onItemDataBound);
        CustomerList.loadCustomerlist();
    });

</script>